/********************************************************************************
**	(C) COPYRIGHT 2017 tongda electric CO.LTD 
**	author        :  zibin.huang<hzbhlz@163.com>
**	version       :  v1.0
**	date           :  2017.01.26
**	description  : pthread_cond的使用。
********************************************************************************/
#ifndef __PTHREAD_COND_H__
#define __PTHREAD_COND_H__	

struct condition_var {
	pthread_cond_t cond;
	pthread_mutex_t mutex;
	int condition;
	int init_flag;
};

int condition_var_init(struct condition_var *cond);
int condition_var_deinit(struct condition_var *cond);
int condition_var_complete(struct condition_var *cond);
int condition_var_wait(struct condition_var *cond);
int condition_var_reset(struct condition_var *cond);

#endif 

